package com.sunwayworld.basemodule.business.ordertask.resource;

import com.sunwayworld.basemodule.business.ordertask.bean.LimsOrderTaskBean;
import com.sunwayworld.basemodule.business.ordertask.service.LimsOrderTaskService;
import com.sunwayworld.framework.data.page.Page;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import java.util.List;

@RequestMapping("/secure/basemodule/business/order-tasks")
public interface LimsOrderTaskResource extends GenericResource<LimsOrderTaskService, LimsOrderTaskBean, Long> {

    @PostMapping("/select/test")
    Page<LimsOrderTaskBean> selectTest(RestJsonWrapperBean wrapperBean);

    @PostMapping("/run/create")
    void createRun(RestJsonWrapperBean wrapperBean);

    @PostMapping("/run/add/tasks")
    void addRunTasks(RestJsonWrapperBean wrapperBean);

    @PostMapping("/run/remove/tasks")
    void removeRunTasks(RestJsonWrapperBean wrapperBean);

    @PostMapping("/run/delete")
    void deleteRun(RestJsonWrapperBean wrapperBean);

    @PostMapping("/action/batch-save-assignment")
    void batchSaveAssignment(RestJsonWrapperBean wrapperBean);

    @PostMapping("/submit")
    void submit(RestJsonWrapperBean wrapperBean);

    @PostMapping("/back/scheduling")
    void backScheduling(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/result/queries", method = RequestMethod.POST)
    Page<LimsOrderTaskBean> selectOrderTaskWithResult(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/dynamic/queries")
    List<LimsOrderTaskBean> testSelectableList(RestJsonWrapperBean wrapper);

    @GetMapping("/select/test-selections")
    List<LimsOrderTaskBean> selectTestSelections(RestJsonWrapperBean wrapperBean, @RequestParam(value = "status") String status);

    @RequestMapping(value = "/supplement/queries", method = RequestMethod.POST)
    Page<LimsOrderTaskBean> selectOrderTaskWithSupplement(RestJsonWrapperBean wrapper);

    @PostMapping("/run/create-with-test")
    void createRunWithTest(RestJsonWrapperBean wrapperBean);

    @GetMapping("/abnormal/test-selections")
    List<LimsOrderTaskBean> selectAbnormalTestSelections();

    @RequestMapping(value = "/action/abnormal", method = RequestMethod.POST)
    void abnormal(RestJsonWrapperBean wrapperBean);
}
